package com.jucai.pppeiyouclient.adapter;

import android.content.Context;

import com.jucai.pppeiyouclient.R;
import com.jucai.pppeiyouclient.base.CommonRecyclerViewAdapter;
import com.jucai.pppeiyouclient.bean.SkillBean;

import java.util.List;

public class MySkillAdapter extends CommonRecyclerViewAdapter<SkillBean> {
    public MySkillAdapter(Context context, List<SkillBean> data) {
        super(context, data);
    }

    @Override
    public void bindHolder(CommonHolder holder, SkillBean skillBean) {
        holder.setText(R.id.my_skill_name, skillBean.getSkill_name());

        switch (skillBean.getSkill_cert_state()) {
            case -1:
                holder.setText(R.id.skill_cert_state, "未通过");
                break;

            case 0:
                holder.setText(R.id.skill_cert_state, "未认证");
                break;

            case 1:
                holder.setText(R.id.skill_cert_state, "审核中");
                break;

            case 2:
                holder.setText(R.id.skill_cert_state, "已认证");
                break;

        }
    }

    @Override
    protected int getItemType(int position) {
        return 0;
    }

    @Override
    public int getLayoutId(int viewType) {
        return R.layout.item_skill_layout;
    }
}
